#include <iostream>
using namespace std;

//二叉树结构
typedef struct Tnode
{
    int data;
    struct Tnode* left;
    struct Tnode* right;
}Tnode;

//递归建树
void createTree(Tnode* &root)
{
    int num;
    cin>>num;
    if(num!=-1)
    {
        //创建新节点
        root=new Tnode;
        root->data=num;
        root->left=NULL;
        root->right=NULL;
        createTree(root->left);
        createTree(root->right);
    }
    return ;
}
void preorder(Tnode* root)
{
    if(root!=NULL)
    {
        cout<<root->data;
        preorder(root->left);
        preorder(root->right);
    }
    return ;

}

bool isEqual(Tnode* root1,Tnode* root2)
{
    if(root1==NULL&&root2==NULL)
        return true;
    if(root1!=NULL&&root2!=NULL&&root1->data==root2->data)
        return isEqual(root1->left,root2->left)&&isEqual(root2->right,root1->right);
    else
        return false;
}
int main()
{
    Tnode* root1=NULL;
    Tnode* root2=NULL;
    //传入一个空指针
    createTree(root1);
    createTree(root2);
    return 0;
}
